package com.tuju.jetpackfirstdemo.adapter

import android.view.View
import android.view.ViewGroup
import com.tuju.jetpackfirstdemo.R
import com.tuju.jetpackfirstdemo.base.baseadapter.BaseRecyclerViewAdapter
import com.tuju.jetpackfirstdemo.base.baseadapter.BaseRecyclerViewHolder
import com.tuju.jetpackfirstdemo.data.ScheduleBean
import kotlinx.android.synthetic.main.item_schedule.view.*

class ScheduleAdapter : BaseRecyclerViewAdapter<ScheduleBean>() {
    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseRecyclerViewHolder<ScheduleBean> {
        return ViewHolder(getView(parent, R.layout.item_schedule))
    }

    inner class ViewHolder(view:View) : BaseRecyclerViewHolder<ScheduleBean>(view) {
        override fun onBaseBindViewHolder(t: ScheduleBean, position: Int) {
            view.tv_name.text = t.name
            view.state10.text = t.status10
            view.state11.text = t.status11
            view.state12.text = t.status12
            view.state13.text = t.status13
            view.state14.text = t.status14
            view.state15.text = t.status15
            view.state16.text = t.status16
            view.state17.text = t.status17
            view.state18.text = t.status18
            view.state19.text = t.status19
            view.state20.text = t.status20
            view.state21.text = t.status21
        }
    }
}